package com.yhb.service;

import com.yhb.model.BalanceFlow;
import com.yhb.model.User;
import com.yhb.model.WithdrawFlow;
import lombok.NonNull;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

public interface BalanceService {
    List<BalanceFlow> getUserBalanceTyped(String userId);

    void insertUserBalance(BalanceFlow balanceFlow);

    void commitWithDraw(User user, BigDecimal amount, BalanceFlow.Type type, String cardId);

    boolean hasPublishedIncome(BalanceFlow.Type type, String additionalInfo);

    List<BalanceFlow> balanceList(String userId);
    List<WithdrawFlow> withdrawList(String userId);
    String withdrawListUrlForRange(Date start, Date end);
    BigDecimal userLifeTimeIncome(String userId);

    @NonNull
    List<BalanceFlow> getBalance(BalanceFlow flow);
}
